<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function opsition(array) {
            for (var i = 0; i < array.length; i++) {
                for (var j = 0; j < array.length; j++) {
                    if (array[j] > array[j + 1]) {
                        var temporary = array[j];
                        array[j] = array[j + 1];
                        array[j + 1] = temporary;
                    }
                }
            }
            return array;
        }
        console.log(opsition([1, 2, 3, 55, 3, 211, 11, 33, 335, 577, 88]));
    </script>
</head>

<body>

</body>

</html>